<template>
  <view class="login-bg">
    <view class="logo-wrap">
      <!-- <image class="logo" src="../../static/logo.png" mode="aspectFit" /> -->
    </view>
    <view class="card">
      <view class="welcome">欢迎使用学生AI助手</view>
      <view class="desc">让学习更高效、更轻松</view>
      <button class="login-btn" type="primary" @tap="wxLogin">
        <image class="wx-icon" src="https://img.yzcdn.cn/vant/wx.png" />
        微信一键登录
      </button>
    </view>
  </view>
</template>

<script setup>
function wxLogin() {
  uni.showToast({
    title: '登录成功',
    icon: 'success',
    duration: 1000
  });
  setTimeout(() => {
    uni.switchTab({
      url: '/pages/ai-dialog/index'
    });
  }, 1000);
}
</script>

<style scoped>
.login-bg {
  min-height: 100vh;
  background: linear-gradient(180deg, #07c160 0%, #eaf6ff 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
.logo-wrap {
  width: 100vw;
  display: flex;
  justify-content: center;
  margin-top: 120rpx;
  margin-bottom: 40rpx;
}
.logo {
  width: 200rpx;
  height: 200rpx;
  border-radius: 40rpx;
  background: #fff;
  box-shadow: 0 8rpx 32rpx rgba(7,193,96,0.08);
}
.card {
  width: 84vw;
  background: #fff;
  border-radius: 32rpx;
  box-shadow: 0 8rpx 32rpx rgba(7,193,96,0.08);
  padding: 64rpx 32rpx 48rpx 32rpx;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.welcome {
  font-size: 40rpx;
  font-weight: bold;
  color: #222;
  margin-bottom: 16rpx;
}
.desc {
  font-size: 28rpx;
  color: #888;
  margin-bottom: 56rpx;
}
.login-btn {
  width: 100%;
  height: 88rpx;
  font-size: 32rpx;
  border-radius: 44rpx;
  background: #07c160;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
}
.wx-icon {
  width: 40rpx;
  height: 40rpx;
  margin-right: 16rpx;
}
</style> 